<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>麦知网——学问有余，乐为人师</title>
<!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
<script src="http://cdn.bootcss.com/jquery/1.10.2/jquery.min.js"></script>
<!-- Bootstrap文件 -->
<link href="http://cdn.bootcss.com/twitter-bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">
<link href="http://cdn.bootcss.com/bootstrap-switch/3.2.0/css/bootstrap2/bootstrap-switch.min.css" rel="stylesheet">
<script src="http://cdn.bootcss.com/twitter-bootstrap/3.2.0/js/bootstrap.min.js"></script>
<script src="http://cdn.bootcss.com/bootstrap-switch/3.2.0/js/bootstrap-switch.min.js"></script>
<!-- 图标 -->
<link href="//libs.baidu.com/fontawesome/4.0.3/css/font-awesome.min.css" rel="stylesheet">
{% block extra %} {% endblock %}
</head>
<body>
<div class="container">
    <div class="row">
        <div class="navbar navbar-default navbar-fixed-top" role="navigation"  style="background-color: #144264">
            <div class=" col-sm-10 col-sm-offset-1">
              <ul class="nav navbar-nav">
              <li><a href="{% url 'users:index' %}"><b><i class="icon-home"></i> 首页</b></a></li>
              <li><a href="{% url 'courses:types' %}"><b><i class="icon-book"></i> 课程</b></a></li>
              <li><a href="{% url 'groups:groups' %}"><b><i class="icon-group"></i> 小组</b></a></li>
              <li><a href="{% url 'rewards:rewards' %}"><b><i class="icon-money"></i> 悬赏</b></a></li>
            </ul>
                <a style="margin-left:10%;color:white" class="navbar-brand" href="{% url 'users:index' %}"><strong>麦知</strong></a>
              <ul class="nav navbar-nav navbar-right">
                <li style="margin-top:13px" class="form-inline">
                    <!-- 搜索 -->
                    <div>
                        <button class="btn btn-primary btn-sm" style="height:25px;" value="搜索"
                                onclick="window.location.href(/search/)"><i class="icon-search"></i></button>
                    </div>
                <div class="clearfix"></div>
                </li>
                <li><a id="selectPartner" href="javascript:void(0)" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-bell-alt"></i>{% ifequal havent 0 %}<span></span>{% else %}<span class="badge" id="havent">{{havent}}</span>{% endifequal %}</a>
                        <ul class="dropdown-menu">
                            {% for k in message %}
                            <li><a href="javascript:void(0)" onclick="mes_read({{k.2}});"><b>{{k.0}}</b>给您发了一条私信 : <div style="width:200px;overflow:hidden;text-overflow:ellipsis;"><i>{{k.1}}</i></div><!--<span><a href='#'>回复</a></span>--></a></li>
                         {% endfor %}
                            <li><a href="{% url 'users:mes' %}"><span style="font-size:12px;margin-left:20px;">查看全部私信 >></span></a><hr/></li>

                            {% for m in waningMes %}
                            <li>
                                {% ifequal m.4 1 %}
                                <a href="javascript:void(0)" onclick="read(1,{{m.6}},{{m.2}},0);">{{m.1}}揭榜您的悬赏<b>{{m.3}}</b></a>
                                {% endifequal %}

                                {% ifequal m.4 2 %}
                                <a href="javascript:void(0)" onclick="read(2,{{m.6}},{{m.2}},0);">{{m.1}}购买您的课程<b>{{m.3}}</b></a>
                                {% endifequal %}

                                {% ifequal m.4 3 %}
                                <!--{% url 'users:index' %}?page=2#news_{{m.2}}-->
                                <a href="javascript:void(0)" onclick="news_page({{m.2}},{{m.6}});">{{m.1}}在<b>{{m.3}}</b>中回复了您</a>
                                {% endifequal %}

                                {% ifequal m.4 4 %}
                                <a href="javascript:void(0)" onclick="reOfTopic_page({{m.5}},{{m.2}},{{m.6}});">{{m.1}}在<b>{{m.3}}</b>中回复了您</a>
                                {% endifequal %}

                                {% ifequal m.4 5 %}
                                <a href="javascript:void(0)" onclick="news_page({{m.2}},{{m.6}})">{{m.1}}在<b>{{m.3}}</b>中回复了您</a>
                                {% endifequal %}

                                {% ifequal m.4 6 %}
                                <a href="javascript:void(0)" onclick="reOfTopic_page({{m.5}},{{m.2}},{{m.6}});">{{m.1}}在<b>{{m.3}}</b>中回复了您</a>
                                {% endifequal %}

                                {% ifequal m.4 7 %}
                                <a href="javascript:void(0)" onclick="read(7,{{m.6}},{{m.2}},0);">{{m.1}}完成您的悬赏<b>{{m.3}}</b>,请到<b>您购买的课程中</b>查看</a>
                                {% endifequal %}

                                {% ifequal m.4 8 %}
                                <a href="javascript:void(0)" onclick="read(8,{{m.6}},{{m.2}},0);">{{m.1}}在<b>{{m.3}}</b>中选择了您</a>
                                {% endifequal %}

                                {% ifequal m.4 9 %}
                                <a href="javascript:void(0)" onclick="news_page({{m.2}},{{m.6}})">您的<b>{{m.3}}</b>获得了赞</a>
                                {% endifequal %}
        <!--<a href="{% url 'courses:thecourse' m.2 %}#course_{{m.5}}">-->
                                {% ifequal m.4 10 %}
                                <a href="javascript:void(0)" onclick="read(10,{{m.6}},{{m.2}},{{m.5}});">{{m.1}}在<b>{{m.3}}</b>中评论了您</a>
                                {% endifequal %}

                                {% ifequal m.4 11 %}
                                <a href="javascript:void(0)" onclick="reward_page({{m.5}},{{m.2}},{{m.6}})">{{m.1}}在<b>{{m.3}}</b>中评论了您</a>
                                {% endifequal %}

                                {% ifequal m.4 12 %}
                                <a href="javascript:void(0)" onclick="reOfTopic_page({{m.5}},{{m.2}},{{m.6}});">您在<b>{{m.3}}</b>中的回复获得了赞</a>
                                {% endifequal %}

                                {% ifequal m.4 13 %}
                                <a href="javascript:void(0)" onclick="news_page({{m.2}},{{m.6}})">您在<b>{{m.3}}</b>中的回复获得了赞</a>
                                {% endifequal %}

                            </li>
                             {% endfor %}

                             <li><a href="{% url 'users:warning' %}"><span style="font-size:12px;margin-left:20px;">查看全部提醒 >></span></a></li>
                        </ul>
                </li>
                <!--<div style='width:180px;'><span style='font-size:10px'>{{k.0}}给您发了一条私信 : <i>{{k.1}}</i></span></div><div style='font-size:10px' class='pull-right'><a href='#'>回复</a></div><hr /><a href='javascript:void(0)' class='pull-right' style='font-size:8px'>查看更多 >></a>-->
                <li><a href="javascript:void(0)" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-reorder"></i></a>
                        <ul class="dropdown-menu">
                           {% ifequal info.status 1 %}
                            <li><a href="{% url 'users:teacherapply' %}"><i class="icon-check"></i> 申请权限</a></li>
                            {% else %}
                            <li><a href="{% url 'courses:coursecreate' %}"><i class="icon-check"></i> 创建课程</a></li>
                            {% endifequal %}
                            <li><a href="{% url 'users:home' user_id %}"><i class="icon-home"></i> 我的主页</a></li>
                            <li class="divider"></li>
                            <li><a href="{% url 'users:feedback' %}"><i class="icon-user-md"></i> 意见反馈</a></li>
                            <li class="divider"></li>
                            <li><a href="javascript:void(0)" onclick="logout()"><i class="icon-signout"></i> 登出</a></li>
                        </ul>
                </li>
              </ul>
            </div><!--/.nav-collapse -->
        </div>
    </div>
<!-- 内容 -->
<div style="margin-top: 120px">
    {% block content %} {% endblock %}
</div>
</div>
</body>
</html>